#ifndef __Packet_H__
#define __Packet_H__
#include "TLV.hpp"
#include <cstdint>
#include <string>
#include <vector>
#include <memory>
#include <functional>

using namespace std;
namespace wd
{
class TLV;
class Packet
{
public:
    int _type;
    int _length;
    string _msg;
    Packet();
    Packet(int type,string &msg);
    ~Packet();
    //转换为TLV
    TLV toTLV() const;
    //从TLV转换解析网络数据
    void fromTLV(const TLV &tlv);
};
}






#endif

